﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using laba2.Entity;
using laba2.Repository.IRepository;

namespace laba2.Repository.RepositoryImpl
{
    public class CourseRepository: Repository<Course>,ICourseRepository
    {
        public CourseRepository(List<Course> list) : base(list)
        {
        }

        public List<Course> GetByName(string name)
        {
            return (from course in _list
                    where course.Name == name
                    select course).ToList();
        }
    }
}
